
package com.rcnss.ui.application.main;

import com.rcnss.ui.form.AppLoginForm;
import com.rcnss.web.session.SimpleSessionUser;
import com.vaadin.Application;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;

/**
 * Sample application layout, similar (almost identical) to Apple iTunes.
 *
 * @author IT Mill Ltd.
 *
 */
@SuppressWarnings("serial")
public class MainApp extends Application {

    public static SimpleSessionUser UserSessionData = new SimpleSessionUser();
    private VerticalLayout formLayout = new VerticalLayout();
    private VerticalLayout rootLayout = new VerticalLayout();

    @Override
   public void init() {
        final Window root = new Window("CNSS Tunisie (RECLAMATION)", rootLayout);
        setMainWindow(root);
        rootLayout.setSizeFull();
        rootLayout.setMargin(false);
        rootLayout.setSpacing(false);

        formLayout.setSizeFull();

        final AppLoginForm login = new AppLoginForm();
        root.addComponent(login);
        login.setSizeUndefined();
        rootLayout.setComponentAlignment(login, Alignment.MIDDLE_CENTER);
        setTheme("mytheme");
    }

}